#include"server.hpp"
#include<memory>

void hander()
{

}


static void Usage(string proc)
{
    cout << "\nUsage:\n\t" << proc << " server_ip server_port\n\n";
}
int main(int args,char* argv[])
{  
     if(args<2)
     {
        cerr<<"io error"<<errno<<strerror(errno)<<endl;
        Usage(argv[0]);
        exit(0);
     }
     uint16_t port=atoi(argv[1]);
     unique_ptr<udpserver> serv(new udpserver(hander,port));
     serv->initserver();
     serv->run();
     
    


}